package com.av.bcacc.jetpack;

import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.av.bcacc.jetpack.databinding.ActivityJetpackMainBinding;
import com.av.bcacc.jetpack.databinding.DatabindingEnterActivity;
import com.av.bcacc.jetpack.viewmodel.ScreenOrientationActivity;
import com.av.bcacc.jetpack.viewmodel.ViewModelActivity;

public class JetpackMainActivity extends AppCompatActivity {
    ActivityJetpackMainBinding jetpackMainBinding;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        jetpackMainBinding= DataBindingUtil.setContentView(this,R.layout.activity_jetpack_main);

        jetpackMainBinding.liveData.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity( new Intent(JetpackMainActivity.this, DatabindingEnterActivity.class));
            }
        });
        jetpackMainBinding.navgationBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity( new Intent(JetpackMainActivity.this,NavigationActivity.class));

            }
        });
        jetpackMainBinding.orationAct.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity( new Intent(JetpackMainActivity.this, ScreenOrientationActivity.class));
            }
        });
        jetpackMainBinding.viewModelAct.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity( new Intent(JetpackMainActivity.this, ViewModelActivity.class));
            }
        });
    }
}
